﻿using System.Diagnostics.Contracts;

namespace System.Reactive.Concurrency
{
	[ContractClass(typeof(IStopwatchProviderContract))]
	public interface IStopwatchProvider
	{
		IStopwatch StartStopwatch();
	}

	[ContractClassFor(typeof(IStopwatchProvider))]
	internal abstract class IStopwatchProviderContract : IStopwatchProvider
	{
		public IStopwatch StartStopwatch()
		{
			Contract.Ensures(Contract.Result<IStopwatch>() != null, null, "Contract.Result<IStopwatch>() != null");
			return null;
		}
	}
}